ice cream parlor hackerrank solution